package com.bi.bitest.bao.tasks;

import android.os.AsyncTask;

/**
 * Created
 * Author:bi[FR]
 * Date:15-10-20
 */
public abstract class BaseTask extends AsyncTask<String,Void,TaskResult> {
    private TaskCallback callback;
    public  BaseTask(TaskCallback callback){
        this.callback=callback;
    }
    @Override
    protected TaskResult doInBackground(String... params) {
        return null;
    }

    @Override
    protected void onPostExecute(TaskResult result) {
        if (callback != null) {
            callback.onTaskFinished(result);
        }
        super.onPostExecute(result);
    }
}
